local key = 'blog:like'.. KEYS[1]
local userId = ARGV[1]
local timestamp = ARGV[2]
local exists = redis.call('ZSCORE', key, userId)

if(exists) then
    redis.call('ZREM', key, userId)
    return 0
else
    redis.call('ZADD', key, timestamp, userId)
    return 1
end
